<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
	<html>

	<head>
		<meta charset="utf-8">
		<title>登录</title>
		<link href="css/myui.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" href="css/myui.css">
		<style type="text/css">
			html,body{
				background: #fcfcfc;
			}
			.login_content{
				width: 100%;
				position: relative;
				overflow: hidden;
				padding-top: 1rem;
				font-size: 1rem;
			}
			.login_content1{
				width: 90%;
				margin: 0 auto;
				background: #f9f9f9;
				border-bottom: 1px solid #53b0ff;
				margin-top: 1rem;
			}
			.login_content1_btn,.login_content1_forget{
				width: 90%;
				margin: 0 auto;
				margin-top: 2.5rem;
			}
			.login_content1_btn>button{
				width: 100%;
				background: #53b0ff;
				color: #fff;
				border: 0;
			}
			.login_content1_forget{
				text-align: right;
				font-size: 0.8rem;
				color: #80c5ff;
			}
			.mui-input-row label {
			    width: 16%;
			}
			.mui-input-row label~input{
			    width: 74%;
			    float: left;
			}
			.mui-input-row label img{
				width: 100%;
			}
			#Retrieve_password{
				color: #80c5ff;
			}
		</style>
		<script src="js/mui.min.js"></script>
		<script type="text/javascript" src="js/jquery-1.9.0.js"></script>
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
	</head>

	<body>

		<div id="app" class="mui-views" data-view="1">
			<div class="mui-view">
				<div class="mui-navbar">
					<div class="mui-navbar-inner mui-bar mui-bar-nav mui-navbar-center">
						<button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left mui-pull-left_style">
							<span class="mui-icon mui-icon-left-nav"></span>
						</button>
						<h1 class="mui-center mui-title mui-title_fff" style="margin-left: -15px;">登录</h1>
					</div>
				</div>
				<div class="mui-pages">
					<div id="setting" class="mui-page mui-page-center">
			<!--页面主内容区结束-->
					</div>
				</div>
			</div>
		</div>

		<div class="login_content">
			<div class="login_content1">
				<div class="mui-input-row">
					<label><img src="img/login_user.png"></label>
					<input type="tel" placeholder="请输入手机号" id="tel">
				</div>
			</div>
			<div class="login_content1">
				<div class="mui-input-row">
					<label><img src="img/login_key.png"></label>
					<input type="password" placeholder="请输入6-12位密码" id="password">
				</div>
			</div>
			<div class="login_content1_btn">
				<button id="is_login">登录</button>
			</div>
			<!--<div class="login_content1_forget">
				<a href="javascript:;" id="Retrieve_password">忘记密码?</a>
			</div>-->
		</div>
				
		
	</body>

	<script src="js/index.js"></script>
	<script type="text/javascript">

	mui.ready(function(){ 
		//打开忘记密码
//		localtionURL("Retrieve_password","Retrieve_password.html");
		document.getElementById("is_login").addEventListener("tap",function(){
			var tel = document.getElementById("tel");
			var password = document.getElementById("password");
			var RegURL = get_url()+"login/lawyer/byPwd/"+tel.value+"/"+password.value;
			var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
    		webviewShow = plus.webview.create("home.html");//后台创建webview并打开show.html
			if(tel.value != "" && password.value != ""){
				$.ajax({
					url: RegURL,
					type: "GET",
					dataType: 'JSONP',//加入这个选项即可
					jsonp: "jsonpcallback",
					success:function(json){
						if(json.isSuccess==true){
						  mui.toast(json.infor);
						  localStorage.setItem("phoneNum", json.phoneNo);
						  localStorage.setItem("isSuccess", json.isSuccess);
						  localStorage.setItem("checked", json.checked);
						   nwaiting.close(); //新webview的载入完毕后关闭等待框
				           webviewShow.show("slide-in-right",150); //把新webview窗体显示出来，显示动画效果为速度150毫秒的右侧移入动画
					  	}else{
					  		mui.toast(json.infor);
					  	}
					},
					error:function(){
						plus.ui.toast("登录失败");
					}
				});
			}else{
				plus.ui.toast("账号或密码不能为空 ");
			}
		});
	});

	</script>
	</html>